home *** CD-ROM | disk | FTP | other *** search
-
- ;** OnForm-Install (2-1-96)
- ;**
- ;** Install script for OnForm V2.0 - Shareware/Demo Version!
- ;**
- ;** Copyright © 1996 Paul Lathwell
- ;** All rights reserved ;**
-
-
-
-
- ;**
- ;** Ask user where to place `OnForm' and setup dir/file vars accordingly
- ;**
-
- (complete 0)
-
- (set onfdest
- (askdir
- (prompt "Select where to install `OnForm'\n"
- "A directory will be created automatically.")
- (help @askdir-help)
- (default @default-dest)
- )
- )
- (set onfdir (tackon onfdest "OnForm"))
- (set @default-dest onfdir)
- (set docdir (tackon onfdir "Docs"))
- (set moddir (tackon onfdir "Modules"))
- (set ocedir (tackon moddir "OCE_Files"))
-
-
- ;**
- ;** Create directory/Check if there is already a copy installed
- ;**
-
- (set extype (exists onfdir))
- (if (= extype 1) (abort "A file named \"OnForm\" already exists"))
- (if (= extype 2)
- (
- (if (exists (tackon onfdir "OnForm"))
- (
- (message
- (cat "A copy of `OnForm' already exists. "
- "If you proceed, this copy will be updated. Certain files "
- "may be overwritten."
- )
- )
- )
- )
- )
- (makedir onfdir (infos))
- )
- (makedir docdir (infos))
- (makedir moddir)
- (makedir ocedir)
- (makedir (tackon onfdir "Addresses"))
-
- (complete 5)
-
-
-
- ;**
- ;** Ask user where to store address files
- ;**
-
- (set adddir
- (askdir
- (prompt "Please select where address\nfiles should be stored.")
- (help @askdir-help)
- (default (tackon onfdir "Addresses"))
- )
- )
-
-
- ;** Make the directory if it does not exist
-
- (set exdir (exists adddir ))
- (if (= exdir 0)
- (makedir adddir)
- )
-
-
-
- (complete 10)
-
-
- ;**
- ;** Install Amos.library
- ;**
-
- (copyfiles
- (help @copyfiles-help)
- (source "OnFormV2.0:libs/Amos.library")
- (dest "LIBS:")
- (prompt "Install Amos.library?...")
- (confirm)
- )
-
- (complete 15)
-
-
- ;**
- ;** Install 'ReadMe.1st' file.
- ;**
-
- (copyfiles
- (help @copyfiles-help)
- (source "OnFormV2.0:ReadMe.1st")
- (dest onfdir)
- (prompt "Installing 'ReadMe.1st' file...")
- (infos)
- )
-
- (complete 20)
-
-
- ;**
- ;** Install Main OnForm Program
- ;**
-
- (copyfiles
- (help @copyfiles-help)
- (source "OnFormV2.0:OnForm/OnForm")
- (dest onfdir)
- (prompt "Install main OnForm program?...")
- (confirm)
- (infos)
- )
-
- (complete 25)
-
-
- ;**
- ;** Check for/install main program preferences
- ;**
-
- (copyfiles
- (help @copyfiles-help)
- (source "OnFormV2.0:OnForm/")
- (dest onfdir)
- (prompt "Preference files for the main OnForm program already exist."
- "Please select which ones should be installed...")
- (pattern "#?.Prefs")
- (confirm)
- )
-
- (complete 30)
-
-
- ;**
- ;** Install Modules
- ;**
-
- (set askmod
- (askbool
- (help "\n \"Install modules?\"\n\n"
- " Allows you to decide whether or not additional "
- "program modules should be installed. If you selected "
- "'Expert' when you began installation, you will be given "
- "a further option allowing you to select which modules "
- "should be installed.\n\n 'Yup' - Install modules.\n\n"
- " 'Nope' - Continue without installing modules.")
- (prompt "Install modules?...")
- (default 1)
- (choices "Yup" "Nope")
- )
- )
- (if (= askmod 1)
- (copyfiles
- (help @copyfiles-help)
- (source "OnFormV2.0:OnForm/Modules/")
- (dest moddir)
- (prompt "Please select modules to be installed...")
- (choices "ADP" "OCE" "Prefs_Ed")
- (confirm)
- )
- )
-
- (complete 40)
-
-
-
- ;**
- ;** Install preferences files for installed modules
- ;**
-
- (set exdest (exists (tackon moddir "ADP")))
- (if (= exdest 1)
- (copyfiles
- (help @copyfiles-help)
- (source "OnFormV2.0:OnForm/Modules/ADPMOD.Prefs")
- (dest moddir)
- (prompt "Install existing preference file\nfor the ADP module?...")
- (confirm)
- )
- )
-
- (complete 45)
-
-
- ;**
- ;** Install existing address files
- ;**
-
- (set insadd
- (askbool
- (help "\n \"Install existing address files?\"\n\n"
- " Allows you to decide whether or not existing "
- "address files should be installed.\n\n"
- " 'Yup' - Install existing address files.\n\n"
- " 'Nope' - Continue without installing addresses.")
- (prompt "Install existing address files?")
- (default 1)
- (choices "Yup" "Nope")
- )
- )
- (if (= insadd 0)
- (set exadd (exists (tackon adddir "Addresses")))
- (if (= exadd 0)
- (copyfiles
- (help @copyfiles-help)
- (source "OnFormV2.0:OnForm/Addresses/")
- (dest adddir)
- (prompt "Installing existing address files...")
- (all)
- (files)
- )
- )
- (if (= exadd 2)
- (foreach "OnFormV2.0:OnForm/Addresses/" "#?.ADP"
- (set exdest (exists (tackon adddir @each-name)))
- (if (= exdest 0)
- (copyfiles
- (help @copyfiles-help)
- (source (tackon "OnFormV2.0:OnForm/Addresses/" @each-name))
- (dest adddir)
- (prompt "Installing '.ADP' files...")
- )
- )
- (complete 50)
- )
- )
- (if (= exadd 2)
- (foreach "OnFormV2.0:OnForm/Addresses/" "#?.AP"
- (set exdest (exists (tackon adddir @each-name)))
- (if (= exdest 0)
- (copyfiles
- (help @copyfiles-help)
- (source (tackon "OnFormV2.0:OnForm/Addresses/" @each-name))
- (dest adddir)
- (prompt "Installing '.AP' files...")
- )
- )
- (complete 55)
- )
- )
- (if (= exadd 2)
- (foreach "OnFormV2.0:OnForm/Addresses/" "#?.OnF"
- (set exdest (exists (tackon adddir @each-name)))
- (if (= exdest 0)
- (copyfiles
- (help @copyfiles-help)
- (source (tackon "OnFormV2.0:OnForm/Addresses/" @each-name))
- (dest adddir)
- (prompt "Installing '.OnF' files...")
- )
- )
- )
- )
- )
-
- (complete 60)
-
-
- ;**
- ;** Install existing OCE files
- ;**
-
- (set exmod (exists (tackon moddir "OCE")))
- (if (= exmod 1)
- (set insoce
- (askbool
- (help "\n \"Install existing OCE files?\"\n\n"
- " Allows you to decide whether ot not existing "
- "OCE files should be installed.\n\n"
- " 'Yup' - Install existing OCE files.\n\n"
- " 'Nope' - Continue without installing OCE files.")
- (prompt "Install existing '.OCE' files?")
- (default 1)
- (choices "Yup" "Nope")
- )
- )
- )
- (if (= insoce 0)
- (set exoce (exists (tackon moddir "OCE_Files")))
- (if (= exoce 0)
- (copyfiles
- (help @copyfiles-help)
- (source "OnFormV2.0:OnForm/Modules/OCE_Files/")
- (dest ocedir)
- (prompt "Installing OCE files...")
- (pattern "#?.OCE")
- (files)
- )
- )
- )
-
- (complete 70)
-
-
- ;**
- ;** Install existing Auto-Load & Def-OCE files
- ;**
-
- (copyfiles
- (help @copyfiles-help)
- (source "OnFormV2.0:OnForm/")
- (dest onfdir)
- (Prompt "Install 'Auto-Load' file?")
- (pattern "Auto-ADP")
- (confirm)
- )
-
- (complete 75)
-
- (copyfiles
- (help @copyfiles-help)
- (source "OnFormV2.0:OnForm/Modules/")
- (dest moddir)
- (prompt "Install 'Def-OCE' file?")
- (pattern "Def-OCE")
- (confirm)
- )
-
-
- (complete 80)
-
- ;**
- ;** Install documentation
- ;**
-
- (set exprog (exists (tackon onfdir "OnForm")))
- (if (= exprog 1)
- (copyfiles
- (help @copyfiles-help)
- (source "OnFormV2.0:OnForm/Docs/")
- (dest docdir)
- (prompt "Please select which documents\nshould be installed...")
- (choices "OnForm.Doc" "OnForm-Tutorial" "OnForm-Set-Up")
- (confirm)
- (infos)
- )
- )
-
- (complete 85)
-
- (set exmod (exists (tackon moddir "ADP")))
- (if (= exmod 1)
- (copyfiles
- (help @copyfiles-help)
- (source "OnFormV2.0:OnForm/Docs/")
- (dest docdir)
- (prompt "Install documentation for 'ADP' module?")
- (choices "ADP.Doc")
- (confirm)
- (infos)
- )
- )
-
- (complete 90)
-
- (set exmod (exists (tackon moddir "OCE")))
- (if (= exmod 1)
- (copyfiles
- (help @copyfiles-help)
- (source "OnFormV2.0:OnForm/Docs/")
- (dest docdir)
- (prompt "Install documentation for 'OCE' module?")
- (choices "OCE.Doc")
- (confirm)
- (infos)
- )
- )
-
- (complete 95)
-
- ;**
- ;** Make program assign in the 'user-startup' file
- ;**
-
- (startup "OnForm"
- (help @startup-help)
- (prompt "It is recommended to modify the 's:User-Startup'\n"
- "file to make the necessary program assigns.\n"
- "Shall I do this for you now?")
- (command
- "Assign OnForm: \"" onfdir "\"\n"
- "Assign Addresses: \"" adddir "\"\n"
- )
- )
-
- (makeassign "OnForm" onfdir)
- (makeassign "Addresses" adddir)
-
-
- (complete 100)
-
-
- (exit)
-